-- GENERATED SPELL FOR [Mana Warp] --


function spell0_16530(pUnit, Event) --@Warp Breach,Self--
pUnit:FullCastSpellOnTarget(29919,pUnit)
pUnit:RegisterEvent('Sorts_16530', 1000, 1)
end

function spell1_16530(pUnit, Event) --@Warp Breach,Self--
pUnit:FullCastSpellOnTarget(37079,pUnit)
pUnit:RegisterEvent('Sorts_16530', 5274, 1)
end

function Sorts_16530(pUnit, Event)
local choix_sorts_16530 = math.random(0, 1)
if choix_sorts_16530 == 0 then
pUnit:RegisterEvent('spell0_16530', 1, 1)
end
if choix_sorts_16530 == 1 then
pUnit:RegisterEvent('spell1_16530', 1, 1)
end
end

function mob16530_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16530', math.random(1500, 3000), 1)
end

function mob16530_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16530_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16530_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16530, 1, 'mob16530_Action')
RegisterUnitEvent(16530, 2, 'mob16530_Leave')
RegisterUnitEvent(16530, 3, 'mob16530_Kill')
RegisterUnitEvent(16530, 4, 'mob16530_Die')
